<!doctype html>

<html>

<head>
    <meta charset="utf-8">
    <title>jQuery打印插件jqprint</title>
    <script language="javascript" src="jquery-1.4.4.min.js"></script>
    <!-- 
如果您使用的是高版本jQuery调用下面jQuery迁移辅助插件即可
<script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>
-->
    <script language="javascript" src="jquery.jqprint-0.3.js"></script>
    <script language="javascript">

        function aa() {
            $("#ddd").jqprint();
        }
    </script>
</head>

<body>
    456789749
    <div id="ddd">
        <table>
            <tr>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
            </tr>
            <tr>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
            </tr>
            <tr>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
            </tr>
            <tr>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
            </tr>
            <tr>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
                <td>test</td>
            </tr>
        </table>
        <!-- 分页打印 -->
        <div style="page-break-after:always;"></div>
        123456
    </div>
    <input type="button" onclick="aa()" value="打印" />
</body>

</html>